package com.xiaoyu.common.core.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.http.HttpStatus;

/**
 * @author helen
 * @since 2019/12/25
 * 参考 HttpStatus
 */

@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public enum ResultCodeEnum   {


    SUCCESS(true, "200", "操作成功"),
    FAILE(false, "500", "服务端异常"),
    NOT_LOGIN(false, "401.1", "未登录"),
    LOGIN_FAILE(false, "401.2", "登录失败"),
    NOT_AUTHORIZATION(false, "401.3", "未授权"),
    GATEWAY_EXCEPTION(false, "502.1", "网关异常"),
    DUPLICATE_KEY(false, "551", "主键冲突");



    private Boolean success;

    private String code;

    private String msg;


}
